package ZUOYE;

public class Student {
    public  String xm;
    public String xh;

    public String getXm() {
        return xm;
    }

    public void setXm(String xm) {
        this.xm = xm;
    }

    public String getXh() {
        return xh;
    }

    public void setXh(String xh) {
        this.xh = xh;
    }

    @Override
    public String toString() {
        return "Student{" +
                "xm='" + xm + '\'' +
                ", xh='" + xh + '\'' +
                '}';
    }
    //调用有参的构造方法
    public void test(String xm,String xh,String title,String company){
        System.out.println("姓名为:"+xm+"\n"+"学号为:"+xh+"\n"+"职位为:"+title+"\n"+"公司的名称:"+company+"\n");
    }
}
